__author__ = 'shawhen'

from .. import Kernel32

from ..shared import minwindef as m_shared_minwindef


def SetHandleInformation(hObject, dwMask, dwFlags):
    """
    :return True/False
    """
    result = Kernel32.Kernel32_dll.SetHandleInformation(hObject, dwMask, dwFlags)
    if result == m_shared_minwindef.FALSE:
        result = False
    elif result == m_shared_minwindef.TRUE:
        result = True
    return result


def CloseHandle(hObject):
    """
    :return True/False
    """
    result = Kernel32.Kernel32_dll.CloseHandle(hObject)
    if result == m_shared_minwindef.FALSE:
        result = False
    elif result == m_shared_minwindef.TRUE:
        result = True
    return result